import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int k = sc.nextInt();

        int[] an = new int[n + 1];


        List<Integer> p = new ArrayList<>();
        for (int i = 1; i <= n; i++) {
            an[i] = sc.nextInt();
            if (an[i] == 0) {
                p.add(an[i]);
            }
        }

        int t = 0;
        int minD = 50;
        for (int i = 1; i <= n; i++) {
            if (an[i] <= k && an[i] > 0 && getMinD(i, p) < minD) {
                minD = getMinD(i, p);
                t = i;
            }
        }
        System.out.println(t);


    }

    //求最小距离的 fangzi位置
    private static int getMinD(int a, List<Integer> p) {
        int minD = 50;
        for (int i = 0; i < p.size(); i++) {
            if (Math.abs(a - p.get(i)) < minD) {
                minD = Math.abs(a - p.get(i));
            }
        }
        return minD;
    }
}